package com.example.json;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.google.gson.Gson;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Student student1 = new Student("Jack",20);
        Gson gson =new Gson();
        String jsonStudent1 = gson.toJson(student1);


    }
}